doctype html
html
	head
		title #{post.title}
		meta(name="viewport",content="width=device-width, initial-scale=1")
		link(rel="stylesheet",href="/materialize/css/materialize.css")
		link(rel="stylesheet",href="/materialize/css/main.css")
	body
		.indexWrapper
			nav.top-nav
				.nav-wrapper.container
					a.page-title(href="/")
						span 昨日头条
			.container
				.row.section
					.col.s12
						h4.postTitle #{post.title}
						.post !{post.content}
				.row.section
					.col.s12
						.commentWrapper
							ul
								li.card.lighten-5
									.card-content
										form(name="commentForm",method="post",action="/post/addComment")
											input(name="postId",type="hidden",value=post.id)
											//- .input-field
												input(name="username",placeholder="名字")
											.input-field
												textarea(placeholder="内容",name="content",class="materialize-textarea")
											.input-field
												button.waves-effect.waves-light.btn 发表
								each comment in comments
									li.card.lighten-5
										.card-content
											p.info #{comment.username || '匿名用户'} #{comment.createdAt.toISOString().replace(/T.*/,'')}
											p.content !{comment.content}

		script(src="/jspm_packages/system.js")
		script(src="/config.js")
		script.
			//- System.import('scripts/post');
